local trace = require "trace"
local print_r=require 'api'
local cache={[1]=1,[2]=1}

local function factorial(n)
    if cache[n]~=nil then
	   return cache[n]
	end
	if n <= 1 then
		return 1;
	end
	cache[n]=factorial(n-1) * n
	return cache[n]
end

function foo(n)
	trace.trace("n s",n)
	local s =  factorial(200)
	return s
end

function hello()
	print "hello"
end

foo(3)
hello()
foo()
print_r(cache)
